#include <iostream>
#include <iomanip>

using namespace std;

int q[10000];
int n;
int count1=0,count2=0; 

int main(){
	cin>>n;
	for(int a=0;a<n;a++){
		cin>>q[a];
		if(q[a]>=60){
			count1++;
		}
		if(q[a]>=85){
			count2++;
		}
	}
	cout<<fixed<<setprecision(2)<<(count1*100.00/n)<<"%"<<endl;
	cout<<fixed<<setprecision(2)<<(count2*100.00/n)<<"%"<<endl;
} 
